Skip to content

Support and fix the regular constraint for MiniZinc#952

Open
hbierlee wants to merge 9 commits into
masterfrom
fix/support-regular-for-minizinc
Open

Support and fix the regular constraint for MiniZinc#952
hbierlee wants to merge 9 commits into
masterfrom
fix/support-regular-for-minizinc

Conversation

@hbierlee

@hbierlee hbierlee commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

The regular constraint was not in the support globals of MiniZinc, even though it was implemented. The implementation needed to be fixed as well. The convert_expression now can also handle strings, which are part of the MiniZinc language. Reification is not supported (https://github.com/MiniZinc/libminizinc/blob/ce06f39e8a7667721ed7410745d82e896bd9b16f/share/minizinc/std/fzn_regular_reif.mzn#L4).

@hbierlee hbierlee mentioned this pull request Apr 24, 2026
8 tasks
@Dimosts Dimosts self-assigned this Jun 15, 2026
@Dimosts Dimosts marked this pull request as ready for review June 15, 2026 10:41
Comment thread cpmpy/solvers/minizinc.py Outdated
@Dimosts Dimosts requested a review from WoutPiessens June 15, 2026 11:57
@WoutPiessens WoutPiessens force-pushed the fix/support-regular-for-minizinc branch 2 times, most recently from dcda911 to 65ffbf4 Compare June 15, 2026 14:00

@WoutPiessens WoutPiessens left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks great, one small thing: a transition dictionary object is already built in the constructor of Regular, so it can be used here.

@Dimosts Dimosts requested a review from tias June 16, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants